﻿<%template _header%>
<%namespace YouHP.Model%>
<!--header end-->

<!--主体-->
<script type="text/javascript">
	function checkCheckBox(form,objtag)
	{
		if (typeof(objtag.checked) == "undefined")
		{
			objtag.checked = true;
		}
		for(var i = 0; i < form.elements.length; i++) 
		{
			var e = form.elements[i];
			if(e.name == "pmitemid") 
			{
				e.checked = objtag.checked;
			}
		}
		objtag.checked = !objtag.checked;
	}
</script>
<div class="layout-cols2">
<%template _memmenu%>

<div class="pannelcontent">

	<div class="pcontent">
	   <div  class="panneldetail">
		<%template _mempmenu%>
			<div class="pannelbody">
			
                <%if IsPost%>
                <%template _msgbox%>
                <%else%>
					<div class="messagelist">
			
						<div style ="text-align:right; margin-bottom:10px;">
						<p class="newmessage"><a href="PostPm.aspx" class="submitbutton">写新消息</a></p></div>
				  		<form id="pmform" name="pmform" method="post" action="">
						<table width="700px" border="0" cellspacing="0" cellpadding="0" ID="Table1">
					    <%csharp%>
						foreach(MessageInfo Pm in PmList)
						{
						<%/csharp%>
						<tbody>
							<tr class="messagetable" onmouseover="this.className='messagetableon'" onmouseout="this.className='messagetable'">
							<td width="3%"><img src="/support/dnt/images/message_{Pm.New}.gif" /></td>
							<td width="4%"><input name="pmitemid" id="id{Pm.Pmid}" type="checkbox" id="pmitemid" value="{Pm.Pmid}" style="margin-top:-1px;"/></td>
							<td width="50%" style="text-align:left;"><a href="ShowPm.aspx?Pmid={Pm.Pmid}">{Pm.Subject}</a> </td>
							<td width="30%">
						      
						     <%csharp%>
								//aspxrewriteurl = this.UserInfoAspxRewrite({Pm.Msgfromid})
								string aspxrewriteurl = "";
							<%/csharp%>
							<a href="{aspxrewriteurl}" target="_blank">{Pm.Msgfrom}</a>   <span class="fontfamily">{Pm.Postdatetime}</span></td>
							<td><a href="#" onclick="_$('id{Pm.Pmid}').checked=true;_$('pmform').submit();">删除</a></td>
							</tr>
						</tbody>
						<%csharp%>
					     }
						<%/csharp%>
						</table>
						</form>
						</div>
						<div class="pannelmessage" >
						 
									<div class="pannelleft" style="width: 160px;">
										<a href="javascript:;"  onclick="checkCheckBox(_$('pmform'),this)" class="selectall">全选</a>&nbsp;&nbsp;&nbsp;
										<a href="#" onclick="_$('pmform').submit()" class="selectall">删除</a> 
									</div>
									<div class="pannelright" style="width: 70%;">
											<table width="100%" border="0" cellspacing="0" cellpadding="0">
												<tbody>
													<tr>
														<th class="ticketleft">
															共有短消息:<span class="ticketnumbers">{UsedMsgCount}</span>条 上限: {MaxMsg}条
														</th>
														<td width="300">
															<div class="ticket-show" style="width:95%;">
																<div style="width:{usedmsgbarwidth}%;"></div>
															</div>
														</td>
													</tr>
												</tbody>
										 </table>
									</div>

						
						</div>
						
				<%/if%>
			</div>	
		</div>
	</div>
</div>
</div>
<!--主体-->

<%template _footer%>
